﻿<Window x:Class="WPP_Console.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:local="clr-namespace:WPP_Console"
        Title="Web Package Pro" Background="#FF333333" mc:Ignorable="d" Icon="images/package-icon2.ico" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" Foreground="#FFA3530A" Height="767" Width="816" WindowStartupLocation="CenterScreen">
    <Window.TaskbarItemInfo>
        <TaskbarItemInfo />
    </Window.TaskbarItemInfo>
    <Window.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="themes\WPP_Orange.xaml" />
            </ResourceDictionary.MergedDictionaries>
        </ResourceDictionary>
    </Window.Resources>
    <Grid Name="RootGrid">
        <!-- Root Dock Panel, contains the Menu on top and a Grid element which is the root of all other content -->
        <DockPanel Name="RootDock">
            <Menu DockPanel.Dock="Top" Height="26">
                <MenuItem Header="FILE">
                    <MenuItem Header="Exit" Name="ExitMenu" Click="ExitMenu_Click" />
                </MenuItem>
                <MenuItem Header="OPTIONS" FontWeight="Bold" Foreground="{DynamicResource WPP_Text}">
                    <MenuItem Header="Printers..." Name="PrinterMenu" Click="PrinterMenu_Click" />
                    <MenuItem Header="Clear..." Name="ClearMenu" Click="ClearMenu_Click" />
                    <MenuItem Header="Credentials..." Name="CredMenu" Click="CredMenu_Click" />
                </MenuItem>
            </Menu>
            <DockPanel DockPanel.Dock="Bottom" HorizontalAlignment="Stretch">
                <WrapPanel DockPanel.Dock="Left">
                    <Label Content="" />
                </WrapPanel>
                <WrapPanel DockPanel.Dock="Right" VerticalAlignment="Center" HorizontalAlignment="Right">
                    <TextBox Name="numPageBox" Width="25" Text="25" VerticalAlignment="Center" />
                    <Label VerticalAlignment="Center" Content="Results per page" />
                </WrapPanel>
                <WrapPanel Margin="70,0,0,0" HorizontalAlignment="Center">
                    <Button Name="PageLeft" Content="&lt;" Click="PageLeft_Click" />
                    <Label Name="PageIndex0" Content=" " FontStyle="Italic" />
                    <Label Name="PageIndex1" Content=" " FontStyle="Italic" />
                    <TextBox Name="CurrentPage" Text="1" KeyDown= "CurrentPage_KeyDown"  />
                    <Label Name="PageIndex2" Content="2" FontStyle="Italic" />
                    <Label Name="PageIndex3" Content="3" FontStyle="Italic" />
                    <Button Name="PageRight" Content="&gt;" Click="PageRight_Click" />
                </WrapPanel>
            </DockPanel>
            <Grid Name="Content" Margin="0,0,-5,0">
                <DockPanel Name="ContentDock" Margin="0,-3,5,0">
                    <Grid DockPanel.Dock="Top">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="*" />
                        </Grid.ColumnDefinitions>
                        <Grid.RowDefinitions>
                            <RowDefinition Height="Auto" />
                            <RowDefinition Height="*" />
                        </Grid.RowDefinitions>
                        <Border Grid.Column="0" Grid.Row="0" BorderThickness="2,2,2,0" CornerRadius="3,3,0,0" BorderBrush="{DynamicResource WPP_Orange}" Margin="5,0,5,0">
                            <WrapPanel Background="{DynamicResource WPP_Orange}">
                                <Label Content="SEARCH" FontSize="12" FontWeight="Bold" Height="24" />
                            </WrapPanel>
                        </Border>
                        <Border Grid.Column="0" Grid.Row="1" Margin="5,-1,5,0" Background="#FFF6871B" BorderThickness="2" CornerRadius="0,0,3,3" BorderBrush="#FFF6871B">
                            <DockPanel Name="SearchDock" Background="{DynamicResource WPP_Background}">
                                <StackPanel DockPanel.Dock="Top" VerticalAlignment="Center" CanVerticallyScroll="True">
                                    <WrapPanel Name="wrapPanel1">
                                        <WrapPanel HorizontalAlignment="Center" Height="26" Margin="5">
                                            <TextBox Name="KeywordBox" Width="133" Text="" Height="26" TextChanged="KeywordBox_TextChanged" />
                                            <ComboBox Name="KeywordTypeFilter" Width="140" Height="26" OpacityMask="{x:Null}" Opacity="1" Foreground="{DynamicResource WPP_Text}">
                                                <ComboBoxItem Content="SHIPPING NAME"/>
                                                <ComboBoxItem Content="BILLING NAME"/>
                                                <ComboBoxItem Content="PHONE NUMBER"/>
                                                <ComboBoxItem Content="ORDER NUMBER"/>
                                                <ComboBoxItem Content="PACKAGE NUMBER"/>
                                            </ComboBox>
                                        </WrapPanel>
                                        
                                        <Button Name="ExecuteSearchButton" Content="SEARCH" Height="26" Width="76" Click="ExecuteSearch_Click" IsDefault="True" />
                                        <Button Name="ExecuteSearchNewTab" Content="NEW TAB" Height="26" Width="65" Click="ExecuteSearchNewTab_Click"  />
                                        <Button Name="Greater30" Content="BOXED &gt;30 DAYS" Height="26" Width="99" Click="Greater30_Click" />
                                        <Button Name="ClearForm" Content="CLEAR FORM" Height="26" Width="76" Click="ClearForm_Click" />
                                            
                                        <StackPanel>
                                            <Grid>
                                                <Grid.RowDefinitions>
                                                    <RowDefinition Height="Auto" />
                                                    <RowDefinition Height="Auto" />
                                                </Grid.RowDefinitions>
                                                <Grid.ColumnDefinitions>
                                                    <ColumnDefinition Width="Auto" />
                                                    <ColumnDefinition Width="*" />
                                                </Grid.ColumnDefinitions>
                                                <Label Grid.Column="1" Grid.Row="0" Content="PICKED-UP" VerticalAlignment="Center" HorizontalAlignment="Left" />
                                                <CheckBox Grid.Column="0" Grid.Row="0" Name="CheckComplete" Margin="5,0,5,0" VerticalAlignment="Center" HorizontalAlignment="Left" />
                                            </Grid>
                                            <Grid>
                                                <Grid.RowDefinitions>
                                                    <RowDefinition Height="Auto" />
                                                    <RowDefinition Height="Auto" />
                                                </Grid.RowDefinitions>
                                                <Grid.ColumnDefinitions>
                                                    <ColumnDefinition Width="Auto" />
                                                    <ColumnDefinition Width="*" />
                                                </Grid.ColumnDefinitions>
                                                <Label Grid.Column="1" Grid.Row="1" Content="CANCELLED" VerticalAlignment="Center" HorizontalAlignment="Left" />
                                                <CheckBox Grid.Column="0" Grid.Row="1" Name="CheckCancelled" Margin="5,0,5,0" VerticalAlignment="Center" HorizontalAlignment="Left" />
                                            </Grid>
                                        </StackPanel>
                                        <StackPanel>
                                            <Grid>
                                                <Grid.RowDefinitions>
                                                    <RowDefinition Height="Auto" />
                                                    <RowDefinition Height="*" />
                                                </Grid.RowDefinitions>
                                                <Grid.ColumnDefinitions>
                                                    <ColumnDefinition Width="Auto" />
                                                    <ColumnDefinition Width="*" />
                                                </Grid.ColumnDefinitions>
                                                <Label Grid.Column="1" Grid.Row="0" Content="BOXED" VerticalAlignment="Center" HorizontalAlignment="Left" />
                                                <CheckBox Grid.Column="0" Grid.Row="0" Name="CheckBoxed" Margin="5,0,5,0" VerticalAlignment="Center" HorizontalAlignment="Left" />
                                            </Grid>
                                            <Grid>
                                                <Grid.RowDefinitions>
                                                    <RowDefinition Height="Auto" />
                                                    <RowDefinition Height="*" />
                                                </Grid.RowDefinitions>
                                                <Grid.ColumnDefinitions>
                                                    <ColumnDefinition Width="Auto" />
                                                    <ColumnDefinition Width="*" />
                                                </Grid.ColumnDefinitions>
                                                <Label Grid.Column="1" Grid.Row="1" Content="MULTI-BOX" VerticalAlignment="Center" HorizontalAlignment="Left" />
                                                <CheckBox Grid.Column="0" Grid.Row="1" Name="CheckMultiBox" Margin="5,0,5,0" VerticalAlignment="Center" HorizontalAlignment="Left" />
                                            </Grid>
                                        </StackPanel>
                                    </WrapPanel>
                                </StackPanel>
                                <StackPanel DockPanel.Dock="Top" VerticalAlignment="Center" CanVerticallyScroll="True">
                                    <GroupBox Header="Search Within a Constrained Date">
                                        <StackPanel Name="DateSearches" Width="700" Height="105" DockPanel.Dock="Bottom" Visibility="Visible">
                                            <WrapPanel>
                                                <Label HorizontalContentAlignment="Right" Width="190" FontWeight="Bold">Begin Date</Label>
                                                <Label HorizontalContentAlignment="Right" Width="136" FontWeight="Bold">End Date</Label>
                                                <Label HorizontalContentAlignment="Right" Width="206" FontWeight="Bold">Begin Date</Label>
                                                <Label HorizontalContentAlignment="Right" Width="125" FontWeight="Bold">End Date</Label>
                                            </WrapPanel>
                                            <WrapPanel>
                                                <Label Width="114" FontWeight="Bold">Order Process:</Label>
                                                <DatePicker Name="OrderProcessStartDate" Width="122" SelectedDateChanged="OrderProcessStartDate_SelectedDateChanged"></DatePicker>
                                                <DatePicker Name="OrderProcessEndDate" Width="112" SelectedDateChanged="OrderProcessEndDate_SelectedDateChanged" ></DatePicker>
                                                <Label Width="107" FontWeight="Bold">Package Pick-Up:</Label>
                                                <DatePicker Name="PackagePickUpStartDate" Width="122" SelectedDateChanged="PackagePickUpStartDate_SelectedDateChanged" ></DatePicker>
                                                <DatePicker Name="PackagePickUpEndDate" Width="121" SelectedDateChanged="PackagePickUpEndDate_SelectedDateChanged" ></DatePicker>
                                            </WrapPanel>
                                            <WrapPanel></WrapPanel>
                                            <WrapPanel>
                                                <Label Width="114" FontWeight="Bold">Order Transaction:</Label>
                                                <DatePicker Name="OrderTransactionStartDate" Width="122" SelectedDateChanged="OrderTransactionStartDate_SelectedDateChanged" ></DatePicker>
                                                <DatePicker Name="OrderTransactionEndDate" Width="112" SelectedDateChanged="OrderTransactionEndDate_SelectedDateChanged" ></DatePicker>
                                                <Label Width="107" FontWeight="Bold">Package Boxed:</Label>
                                                <DatePicker Name="PackageBoxedStartDate" Width="122" SelectedDateChanged="PackageBoxedStartDate_SelectedDateChanged"></DatePicker>
                                                <DatePicker Name="PackageBoxedEndDate" SelectedDateChanged="PackageBoxedEndDate_SelectedDateChanged" Width="122"></DatePicker>
                                            </WrapPanel>
                                            <WrapPanel></WrapPanel>
                                            <WrapPanel>
                                                <Label Width="114" FontWeight="Bold">Order Creation:</Label>
                                                <DatePicker Name="OrderCreationStartDate" Width="122" SelectedDateChanged="OrderCreationStartDate_SelectedDateChanged"></DatePicker>
                                                <DatePicker Name="OrderCreationEndDate" Width="112" SelectedDateChanged="OrderCreationEndDate_SelectedDateChanged"></DatePicker>
                                            </WrapPanel>
                                        </StackPanel>
                                    </GroupBox>
                                </StackPanel>
                            </DockPanel>
                        </Border>
                    </Grid>
                    <Border Margin="5,5,5,5" BorderThickness="2" CornerRadius="3" BorderBrush="{DynamicResource WPP_Orange}">
                        <DockPanel Background="{DynamicResource WPP_Orange}" Name="Orders">
                            <TabControl Background="{DynamicResource WPP_Orange}" Name="OrderTabControl" SelectionChanged="OrderTabControl_SelectionChanged">
                                <local:CloseableTabItem x:Name="StartingTabItem" Header="Orders" FontWeight="Normal">
                                    <DataGrid Name="OrderDataGrid1" MouseDoubleClick="OrderDataGrid1_MouseDoubleClick" ItemsSource="{Binding}">
                                        <DataGrid.Columns>
                                            <DataGridTextColumn Width="Auto" Header="SHIPPING NAME" Binding="{Binding Path=ShippingName}"></DataGridTextColumn>
                                            <DataGridTextColumn Width="Auto" Header="BILLING NAME" Binding="{Binding Path=BillingName}"></DataGridTextColumn>
                                            <DataGridTextColumn Width="*" Header="PHONE NUMBER" Binding="{Binding Path=PhoneNumber}"></DataGridTextColumn>
                                            <DataGridTextColumn Width="*" Header="ORDER PROCESSED DATE" Binding="{Binding Path=ProcessDate}"></DataGridTextColumn>
                                            <DataGridTextColumn Width="*" Header="ORDER TRANSACTION DATE" Binding="{Binding Path=TransactionDate}"></DataGridTextColumn>
                                        </DataGrid.Columns>
                                    </DataGrid>
                                </local:CloseableTabItem>
                            </TabControl>
                        </DockPanel>
                    </Border>
                </DockPanel>
            </Grid>
        </DockPanel>
    </Grid>
</Window>
